package com.ramms.eater.view;

import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

public class ListSections extends BaseAdapter {

	private final ItemSection[] values;
	
	public ListSections(ItemSection[] values) {
		super();
//		ArrayList<ItemSection> xvalues = new ArrayList<ItemSection>();
//		for(ItemSection item : values)
//			if(item != null)
//				xvalues.add(item);
//		
//		ItemSection[] fvalues = new ItemSection[xvalues.size()];
//		int i = 0;
//		for(ItemSection ic : xvalues)
//			fvalues[i++] = ic;
		
		this.values = values;
	}
	
	@Override  
    public int getCount() {  
        return values.length;  
    }  

    @Override  
    public Object getItem(int position) {  
        return null;  
    }  

    @Override  
    public long getItemId(int position) {  
        return 0;  
    }  

    @Override  
    public View getView(int position, View convertView, ViewGroup parent) {  
        values[position].generateView(parent);
        return values[position].getView();
    }
    
}
